﻿using SuperSocket.SocketBase;
using SuperSocket.SocketBase.Protocol;
using System;

namespace SuperX.SuperSocket.Server
{
    public class IOTSocketSession : IOTSocketSession<IOTSocketSession>, IDisposable
    {
        /// <summary>
        /// 文件传输
        /// </summary>
        private UpLoadEngine _UpLoadEngine;

        public UpLoadEngine UpLoadEngine
        {
            get
            {
                if (_UpLoadEngine == null)
                {
                    _UpLoadEngine = new UpLoadEngine(this);
                }
                return _UpLoadEngine;
            }
        }

        /// <summary>
        /// 通讯
        /// </summary>
        private Communication _Communication;

        public Communication Communication
        {
            get
            {
                if (_Communication == null)
                {
                    _Communication = new Communication(this);
                }
                return _Communication;
            }
        }

        public void Dispose()
        {
            throw new NotImplementedException();
        }
    }

    public class IOTSocketSession<T> : AppSession<T, BinaryRequestInfo>, IAppSession, ISessionBase where T : IOTSocketSession<T>, new()
    { }
}